home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / Power.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  17.0 KB  |  871 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Power.a
  3. ;
  4. ;    Contains:    Power Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__POWER__') = 'UNDEFINED' THEN
  21. __POWER__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  30.     include 'MixedMode.a'
  31.     ENDIF
  32.  
  33. ; Bit positions for ModemByte 
  34. modemOnBit                        EQU        0
  35. ringWakeUpBit                    EQU        2
  36. modemInstalledBit                EQU        3
  37. ringDetectBit                    EQU        4
  38. modemOnHookBit                    EQU        5
  39. ; masks for ModemByte 
  40. modemOnMask                        EQU        $01
  41. ringWakeUpMask                    EQU        $04
  42. modemInstalledMask                EQU        $08
  43. ringDetectMask                    EQU        $10
  44. modemOnHookMask                    EQU        $20
  45. ; bit positions for BatteryByte 
  46. chargerConnBit                    EQU        0
  47. hiChargeBit                        EQU        1
  48. chargeOverFlowBit                EQU        2
  49. batteryDeadBit                    EQU        3
  50. batteryLowBit                    EQU        4
  51. connChangedBit                    EQU        5
  52. ; masks for BatteryByte 
  53. chargerConnMask                    EQU        $01
  54. hiChargeMask                    EQU        $02
  55. chargeOverFlowMask                EQU        $04
  56. batteryDeadMask                    EQU        $08
  57. batteryLowMask                    EQU        $10
  58. connChangedMask                    EQU        $20
  59.  
  60. ; commands to SleepQRec sleepQProc 
  61. sleepRequest                    EQU        1
  62. sleepDemand                        EQU        2
  63. sleepWakeUp                        EQU        3
  64. sleepRevoke                        EQU        4
  65. sleepUnlock                        EQU        4
  66. sleepDeny                        EQU        5
  67. sleepNow                        EQU        6
  68. dozeDemand                        EQU        7
  69. dozeWakeUp                        EQU        8
  70. dozeRequest                        EQU        9
  71. ; SleepQRec.sleepQFlags 
  72. noCalls                            EQU        1
  73. noRequest                        EQU        2
  74. slpQType                        EQU        16
  75. sleepQType                        EQU        16
  76.  
  77. ; bits in bitfield returned by PMFeatures 
  78. hasWakeupTimer                    EQU        0                    ; 1=wakeup timer is supported                        
  79. hasSharedModemPort                EQU        1                    ; 1=modem port shared by SCC and internal modem    
  80. hasProcessorCycling                EQU        2                    ; 1=processor cycling is supported                    
  81. mustProcessorCycle                EQU        3                    ; 1=processor cycling should not be turned off        
  82. hasReducedSpeed                    EQU        4                    ; 1=processor can be started up at reduced speed    
  83. dynamicSpeedChange                EQU        5                    ; 1=processor speed can be switched dynamically    
  84. hasSCSIDiskMode                    EQU        6                    ; 1=SCSI Disk Mode is supported                    
  85. canGetBatteryTime                EQU        7                    ; 1=battery time can be calculated                    
  86. canWakeupOnRing                    EQU        8                    ; 1=can wakeup when the modem detects a ring        
  87. hasDimmingSupport                EQU        9                    ; 1=has dimming support built in                    
  88. hasStartupTimer                    EQU        10                    ; 1=startup timer is supported                        
  89.  
  90. ; bits in bitfield returned by GetIntModemInfo and set by SetIntModemState 
  91. hasInternalModem                EQU        0                    ; 1=internal modem installed                        
  92. intModemRingDetect                EQU        1                    ; 1=internal modem has detected a ring                
  93. intModemOffHook                    EQU        2                    ; 1=internal modem is off hook                        
  94. intModemRingWakeEnb                EQU        3                    ; 1=wakeup on ring is enabled                        
  95. extModemSelected                EQU        4                    ; 1=external modem selected                        
  96. modemSetBit                        EQU        15                    ; 1=set bit, 0=clear bit (SetIntModemState)        
  97.  
  98. ; bits in BatteryInfo.flags                                     
  99. ; ("chargerConnected" doesn't mean the charger is plugged in)    
  100. batteryInstalled                EQU        7                    ; 1=battery is currently connected                    
  101. batteryCharging                    EQU        6                    ; 1=battery is being charged                        
  102. chargerConnected                EQU        5                    ; 1=charger is connected to the PowerBook            
  103.  
  104. HDPwrQType                        EQU        'HD'                ; hard disk spindown queue element type            
  105. PMgrStateQType                    EQU        'PM'
  106.  
  107. ; typedef struct BatteryInfo  BatteryInfo
  108. BatteryInfo             RECORD    0
  109. flags                     ds.b   1        ; offset: $0 (0)        ; misc flags (see below)                            
  110. warningLevel             ds.b   1        ; offset: $1 (1)        ; scaled warning level (0-255)                        
  111. reserved                 ds.b   1        ; offset: $2 (2)        ; reserved for internal use                        
  112. batteryLevel             ds.b   1        ; offset: $3 (3)        ; scaled battery level (0-255)                        
  113. sizeof                     EQU *            ; size:   $4 (4)
  114.                         ENDR
  115.  
  116. ; typedef SInt8             ModemByte
  117. ; typedef SInt8             BatteryByte
  118. ; typedef long                 PMResultCode
  119. ; typedef struct SleepQRec     SleepQRec, *SleepQRecPtr
  120. ; typedef struct HDQueueElement  HDQueueElement
  121. SleepQRec                 RECORD    0
  122. sleepQLink                 ds.l   1        ; offset: $0 (0)        ; pointer to next queue element                
  123. sleepQType                 ds.w   1        ; offset: $4 (4)        ; queue element type (must be SleepQType)        
  124. sleepQProc                 ds.l   1        ; offset: $6 (6)        ; pointer to sleep universal proc ptr            
  125. sleepQFlags                 ds.w   1        ; offset: $A (10)        ; flags                                        
  126. sizeof                     EQU *            ; size:   $C (12)
  127.                         ENDR
  128.  
  129. HDQueueElement             RECORD    0
  130. hdQLink                     ds.l   1        ; offset: $0 (0)        ; pointer to next queue element                
  131. hdQType                     ds.w   1        ; offset: $4 (4)        ; queue element type (must be HDPwrQType)        
  132. hdFlags                     ds.w   1        ; offset: $6 (6)        ; miscellaneous flags                            
  133. hdProc                     ds.l   1        ; offset: $8 (8)        ; pointer to routine to call                    
  134. hdUser                     ds.l   1        ; offset: $C (12)        ; user-defined (variable storage, etc.)        
  135. sizeof                     EQU *            ; size:   $10 (16)
  136.                         ENDR
  137.  
  138. ; typedef struct BatteryTimeRec  BatteryTimeRec
  139. BatteryTimeRec             RECORD    0
  140. expectedBatteryTime         ds.l   1        ; offset: $0 (0)        ; estimated battery time remaining (seconds)    
  141. minimumBatteryTime         ds.l   1        ; offset: $4 (4)        ; minimum battery time remaining (seconds)        
  142. maximumBatteryTime         ds.l   1        ; offset: $8 (8)        ; maximum battery time remaining (seconds)        
  143. timeUntilCharged         ds.l   1        ; offset: $C (12)        ; time until battery is fully charged (seconds)
  144. sizeof                     EQU *            ; size:   $10 (16)
  145.                         ENDR
  146.  
  147. ; typedef struct WakeupTime  WakeupTime
  148. WakeupTime                 RECORD    0
  149. wakeTime                 ds.l   1        ; offset: $0 (0)        ; wakeup time (same format as current time)        
  150. wakeEnabled                 ds.b   1        ; offset: $4 (4)        ; 1=enable wakeup timer, 0=disable wakeup timer    
  151. filler                     ds.b   1        ; offset: $5 (5)
  152. sizeof                     EQU *            ; size:   $6 (6)
  153.                         ENDR
  154.  
  155. ; typedef struct StartupTime  StartupTime
  156. StartupTime             RECORD    0
  157. startTime                 ds.l   1        ; offset: $0 (0)        ; startup time (same format as current time)        
  158. startEnabled             ds.b   1        ; offset: $4 (4)        ; 1=enable startup timer, 0=disable startup timer    
  159. filler                     ds.b   1        ; offset: $5 (5)
  160. sizeof                     EQU *            ; size:   $6 (6)
  161.                         ENDR
  162.  
  163. ;
  164. ; pascal OSErr DisableWUTime(void)
  165. ;
  166.     IF GENERATINGCFM THEN
  167.         IMPORT_CFM_FUNCTION    DisableWUTime
  168.     ENDIF
  169.  
  170. ;
  171. ; pascal OSErr SetWUTime(long WUTime)
  172. ;
  173.     IF GENERATINGCFM THEN
  174.         IMPORT_CFM_FUNCTION    SetWUTime
  175.     ENDIF
  176.  
  177. ;
  178. ; pascal OSErr GetWUTime(long *WUTime, Byte *WUFlag)
  179. ;
  180.     IF GENERATINGCFM THEN
  181.         IMPORT_CFM_FUNCTION    GetWUTime
  182.     ENDIF
  183.  
  184. ;
  185. ; pascal OSErr BatteryStatus(Byte *Status, Byte *Power)
  186. ;
  187.     IF GENERATINGCFM THEN
  188.         IMPORT_CFM_FUNCTION    BatteryStatus
  189.     ENDIF
  190.  
  191. ;
  192. ; pascal OSErr ModemStatus(Byte *Status)
  193. ;
  194.     IF GENERATINGCFM THEN
  195.         IMPORT_CFM_FUNCTION    ModemStatus
  196.     ENDIF
  197.  
  198. ;
  199. ; pascal long IdleUpdate(void)
  200. ;
  201.     IF ¬ GENERATINGCFM THEN
  202.         ; returns: 
  203.         ;     long              <= D0
  204.         _IdleUpdate:    OPWORD    $A285
  205.     ELSE
  206.         IMPORT_CFM_FUNCTION    IdleUpdate
  207.     ENDIF
  208.  
  209. ;
  210. ; pascal long GetCPUSpeed(void)
  211. ;
  212.     IF ¬ GENERATINGCFM THEN
  213.         ; returns: 
  214.         ;     long              <= D0
  215.         Macro
  216.         _GetCPUSpeed
  217.             dc.w     $70FF
  218.             dc.w     $A485
  219.         EndM
  220.     ELSE
  221.         IMPORT_CFM_FUNCTION    GetCPUSpeed
  222.     ENDIF
  223.  
  224. ;
  225. ; pascal void EnableIdle(void)
  226. ;
  227.     IF ¬ GENERATINGCFM THEN
  228.         Macro
  229.         _EnableIdle
  230.             moveq    #0,d0
  231.             dc.w     $A485
  232.         EndM
  233.     ELSE
  234.         IMPORT_CFM_FUNCTION    EnableIdle
  235.     ENDIF
  236.  
  237. ;
  238. ; pascal void DisableIdle(void)
  239. ;
  240.     IF ¬ GENERATINGCFM THEN
  241.         Macro
  242.         _DisableIdle
  243.             moveq    #1,d0
  244.             dc.w     $A485
  245.         EndM
  246.     ELSE
  247.         IMPORT_CFM_FUNCTION    DisableIdle
  248.     ENDIF
  249.  
  250. ;
  251. ; pascal void SleepQInstall(SleepQRecPtr qRecPtr)
  252. ;
  253.     IF ¬ GENERATINGCFM THEN
  254.         ; parameters: 
  255.         ;     qRecPtr           => A0
  256.         _SleepQInstall:    OPWORD    $A28A
  257.     ELSE
  258.         IMPORT_CFM_FUNCTION    SleepQInstall
  259.     ENDIF
  260.  
  261. ;
  262. ; pascal void SleepQRemove(SleepQRecPtr qRecPtr)
  263. ;
  264.     IF ¬ GENERATINGCFM THEN
  265.         ; parameters: 
  266.         ;     qRecPtr           => A0
  267.         _SleepQRemove:    OPWORD    $A48A
  268.     ELSE
  269.         IMPORT_CFM_FUNCTION    SleepQRemove
  270.     ENDIF
  271.  
  272. ;
  273. ; pascal void AOn(void)
  274. ;
  275.     IF ¬ GENERATINGCFM THEN
  276.         Macro
  277.         _AOn
  278.             moveq    #4,d0
  279.             dc.w     $A685
  280.         EndM
  281.     ELSE
  282.         IMPORT_CFM_FUNCTION    AOn
  283.     ENDIF
  284.  
  285. ;
  286. ; pascal void AOnIgnoreModem(void)
  287. ;
  288.     IF ¬ GENERATINGCFM THEN
  289.         Macro
  290.         _AOnIgnoreModem
  291.             moveq    #5,d0
  292.             dc.w     $A685
  293.         EndM
  294.     ELSE
  295.         IMPORT_CFM_FUNCTION    AOnIgnoreModem
  296.     ENDIF
  297.  
  298. ;
  299. ; pascal void BOn(void)
  300. ;
  301.     IF ¬ GENERATINGCFM THEN
  302.         Macro
  303.         _BOn
  304.             moveq    #0,d0
  305.             dc.w     $A685
  306.         EndM
  307.     ELSE
  308.         IMPORT_CFM_FUNCTION    BOn
  309.     ENDIF
  310.  
  311. ;
  312. ; pascal void AOff(void)
  313. ;
  314.     IF ¬ GENERATINGCFM THEN
  315.         Macro
  316.         _AOff
  317.             dc.w     $7084
  318.             dc.w     $A685
  319.         EndM
  320.     ELSE
  321.         IMPORT_CFM_FUNCTION    AOff
  322.     ENDIF
  323.  
  324. ;
  325. ; pascal void BOff(void)
  326. ;
  327.     IF ¬ GENERATINGCFM THEN
  328.         Macro
  329.         _BOff
  330.             dc.w     $7080
  331.             dc.w     $A685
  332.         EndM
  333.     ELSE
  334.         IMPORT_CFM_FUNCTION    BOff
  335.     ENDIF
  336.  
  337. ; Public Power Management API (NEW!) 
  338. ;
  339. ; pascal short PMSelectorCount(void)
  340. ;
  341.     IF ¬ GENERATINGCFM THEN
  342.         ; returns: 
  343.         ;     short             <= D0
  344.         Macro
  345.         _PMSelectorCount
  346.             moveq    #0,d0
  347.             dc.w     $A09E
  348.         EndM
  349.     ELSE
  350.         IMPORT_CFM_FUNCTION    PMSelectorCount
  351.     ENDIF
  352.  
  353. ;
  354. ; pascal unsigned long PMFeatures(void)
  355. ;
  356.     IF ¬ GENERATINGCFM THEN
  357.         ; returns: 
  358.         ;     unsigned long     <= D0
  359.         Macro
  360.         _PMFeatures
  361.             moveq    #1,d0
  362.             dc.w     $A09E
  363.         EndM
  364.     ELSE
  365.         IMPORT_CFM_FUNCTION    PMFeatures
  366.     ENDIF
  367.  
  368. ;
  369. ; pascal UInt8 GetSleepTimeout(void)
  370. ;
  371.     IF ¬ GENERATINGCFM THEN
  372.         ; returns: 
  373.         ;     UInt8             <= D0
  374.         Macro
  375.         _GetSleepTimeout
  376.             moveq    #2,d0
  377.             dc.w     $A09E
  378.         EndM
  379.     ELSE
  380.         IMPORT_CFM_FUNCTION    GetSleepTimeout
  381.     ENDIF
  382.  
  383. ;
  384. ; pascal void SetSleepTimeout(UInt8 timeout)
  385. ;
  386.     IF ¬ GENERATINGCFM THEN
  387.         ; parameters: 
  388.         ;     timeout           => D0
  389.         Macro
  390.         _SetSleepTimeout
  391.             dc.w     $4840
  392.             move.w    #$0003,d0
  393.             dc.w     $A09E
  394.         EndM
  395.     ELSE
  396.         IMPORT_CFM_FUNCTION    SetSleepTimeout
  397.     ENDIF
  398.  
  399. ;
  400. ; pascal UInt8 GetHardDiskTimeout(void)
  401. ;
  402.     IF ¬ GENERATINGCFM THEN
  403.         ; returns: 
  404.         ;     UInt8             <= D0
  405.         Macro
  406.         _GetHardDiskTimeout
  407.             moveq    #4,d0
  408.             dc.w     $A09E
  409.         EndM
  410.     ELSE
  411.         IMPORT_CFM_FUNCTION    GetHardDiskTimeout
  412.     ENDIF
  413.  
  414. ;
  415. ; pascal void SetHardDiskTimeout(UInt8 timeout)
  416. ;
  417.     IF ¬ GENERATINGCFM THEN
  418.         ; parameters: 
  419.         ;     timeout           => D0
  420.         Macro
  421.         _SetHardDiskTimeout
  422.             dc.w     $4840
  423.             move.w    #$0005,d0
  424.             dc.w     $A09E
  425.         EndM
  426.     ELSE
  427.         IMPORT_CFM_FUNCTION    SetHardDiskTimeout
  428.     ENDIF
  429.  
  430. ;
  431. ; pascal Boolean HardDiskPowered(void)
  432. ;
  433.     IF ¬ GENERATINGCFM THEN
  434.         ; returns: 
  435.         ;     Boolean           <= D0
  436.         Macro
  437.         _HardDiskPowered
  438.             moveq    #6,d0
  439.             dc.w     $A09E
  440.         EndM
  441.     ELSE
  442.         IMPORT_CFM_FUNCTION    HardDiskPowered
  443.     ENDIF
  444.  
  445. ;
  446. ; pascal void SpinDownHardDisk(void)
  447. ;
  448.     IF ¬ GENERATINGCFM THEN
  449.         Macro
  450.         _SpinDownHardDisk
  451.             moveq    #7,d0
  452.             dc.w     $A09E
  453.         EndM
  454.     ELSE
  455.         IMPORT_CFM_FUNCTION    SpinDownHardDisk
  456.     ENDIF
  457.  
  458. ;
  459. ; pascal Boolean IsSpindownDisabled(void)
  460. ;
  461.     IF ¬ GENERATINGCFM THEN
  462.         ; returns: 
  463.         ;     Boolean           <= D0
  464.         Macro
  465.         _IsSpindownDisabled
  466.             moveq    #8,d0
  467.             dc.w     $A09E
  468.         EndM
  469.     ELSE
  470.         IMPORT_CFM_FUNCTION    IsSpindownDisabled
  471.     ENDIF
  472.  
  473. ;
  474. ; pascal void SetSpindownDisable(Boolean setDisable)
  475. ;
  476.     IF ¬ GENERATINGCFM THEN
  477.         ; parameters: 
  478.         ;     setDisable        => D0
  479.         Macro
  480.         _SetSpindownDisable
  481.             dc.w     $4840
  482.             move.w    #$0009,d0
  483.             dc.w     $A09E
  484.         EndM
  485.     ELSE
  486.         IMPORT_CFM_FUNCTION    SetSpindownDisable
  487.     ENDIF
  488.  
  489. ;
  490. ; pascal OSErr HardDiskQInstall(HDQueueElement *theElement)
  491. ;
  492.     IF ¬ GENERATINGCFM THEN
  493.         ; parameters: 
  494.         ;     theElement        => A0
  495.         ; returns: 
  496.         ;     OSErr             <= D0
  497.         Macro
  498.         _HardDiskQInstall
  499.             moveq    #10,d0
  500.             dc.w     $A09E
  501.         EndM
  502.     ELSE
  503.         IMPORT_CFM_FUNCTION    HardDiskQInstall
  504.     ENDIF
  505.  
  506. ;
  507. ; pascal OSErr HardDiskQRemove(HDQueueElement *theElement)
  508. ;
  509.     IF ¬ GENERATINGCFM THEN
  510.         ; parameters: 
  511.         ;     theElement        => A0
  512.         ; returns: 
  513.         ;     OSErr             <= D0
  514.         Macro
  515.         _HardDiskQRemove
  516.             moveq    #11,d0
  517.             dc.w     $A09E
  518.         EndM
  519.     ELSE
  520.         IMPORT_CFM_FUNCTION    HardDiskQRemove
  521.     ENDIF
  522.  
  523. ;
  524. ; pascal void GetScaledBatteryInfo(short whichBattery, BatteryInfo *theInfo)
  525. ;
  526.     IF ¬ GENERATINGCFM THEN
  527.         ; parameters: 
  528.         ;     whichBattery      => D0
  529.         ;     theInfo           => A0
  530.         Macro
  531.         _GetScaledBatteryInfo
  532.             dc.w     $4840
  533.             move.w    #$000C,d0
  534.             dc.w     $A09E
  535.             dc.w     $2080
  536.         EndM
  537.     ELSE
  538.         IMPORT_CFM_FUNCTION    GetScaledBatteryInfo
  539.     ENDIF
  540.  
  541. ;
  542. ; pascal void AutoSleepControl(Boolean enableSleep)
  543. ;
  544.     IF ¬ GENERATINGCFM THEN
  545.         ; parameters: 
  546.         ;     enableSleep       => D0
  547.         Macro
  548.         _AutoSleepControl
  549.             dc.w     $4840
  550.             move.w    #$000D,d0
  551.             dc.w     $A09E
  552.         EndM
  553.     ELSE
  554.         IMPORT_CFM_FUNCTION    AutoSleepControl
  555.     ENDIF
  556.  
  557. ;
  558. ; pascal unsigned long GetIntModemInfo(void)
  559. ;
  560.     IF ¬ GENERATINGCFM THEN
  561.         ; returns: 
  562.         ;     unsigned long     <= D0
  563.         Macro
  564.         _GetIntModemInfo
  565.             moveq    #14,d0
  566.             dc.w     $A09E
  567.         EndM
  568.     ELSE
  569.         IMPORT_CFM_FUNCTION    GetIntModemInfo
  570.     ENDIF
  571.  
  572. ;
  573. ; pascal void SetIntModemState(short theState)
  574. ;
  575.     IF ¬ GENERATINGCFM THEN
  576.         ; parameters: 
  577.         ;     theState          => D0
  578.         Macro
  579.         _SetIntModemState
  580.             dc.w     $4840
  581.             move.w    #$000F,d0
  582.             dc.w     $A09E
  583.         EndM
  584.     ELSE
  585.         IMPORT_CFM_FUNCTION    SetIntModemState
  586.     ENDIF
  587.  
  588. ;
  589. ; pascal short MaximumProcessorSpeed(void)
  590. ;
  591.     IF ¬ GENERATINGCFM THEN
  592.         ; returns: 
  593.         ;     short             <= D0
  594.         Macro
  595.         _MaximumProcessorSpeed
  596.             moveq    #16,d0
  597.             dc.w     $A09E
  598.         EndM
  599.     ELSE
  600.         IMPORT_CFM_FUNCTION    MaximumProcessorSpeed
  601.     ENDIF
  602.  
  603. ;
  604. ; pascal short CurrentProcessorSpeed(void)
  605. ;
  606.     IF ¬ GENERATINGCFM THEN
  607.         ; returns: 
  608.         ;     short             <= D0
  609.         Macro
  610.         _CurrentProcessorSpeed
  611.             moveq    #17,d0
  612.             dc.w     $A09E
  613.         EndM
  614.     ELSE
  615.         IMPORT_CFM_FUNCTION    CurrentProcessorSpeed
  616.     ENDIF
  617.  
  618. ;
  619. ; pascal Boolean FullProcessorSpeed(void)
  620. ;
  621.     IF ¬ GENERATINGCFM THEN
  622.         ; returns: 
  623.         ;     Boolean           <= D0
  624.         Macro
  625.         _FullProcessorSpeed
  626.             moveq    #18,d0
  627.             dc.w     $A09E
  628.         EndM
  629.     ELSE
  630.         IMPORT_CFM_FUNCTION    FullProcessorSpeed
  631.     ENDIF
  632.  
  633. ;
  634. ; pascal Boolean SetProcessorSpeed(Boolean fullSpeed)
  635. ;
  636.     IF ¬ GENERATINGCFM THEN
  637.         ; parameters: 
  638.         ;     fullSpeed         => D0
  639.         ; returns: 
  640.         ;     Boolean           <= D0
  641.         Macro
  642.         _SetProcessorSpeed
  643.             dc.w     $4840
  644.             move.w    #$0013,d0
  645.             dc.w     $A09E
  646.         EndM
  647.     ELSE
  648.         IMPORT_CFM_FUNCTION    SetProcessorSpeed
  649.     ENDIF
  650.  
  651. ;
  652. ; pascal short GetSCSIDiskModeAddress(void)
  653. ;
  654.     IF ¬ GENERATINGCFM THEN
  655.         ; returns: 
  656.         ;     short             <= D0
  657.         Macro
  658.         _GetSCSIDiskModeAddress
  659.             moveq    #20,d0
  660.             dc.w     $A09E
  661.         EndM
  662.     ELSE
  663.         IMPORT_CFM_FUNCTION    GetSCSIDiskModeAddress
  664.     ENDIF
  665.  
  666. ;
  667. ; pascal void SetSCSIDiskModeAddress(short scsiAddress)
  668. ;
  669.     IF ¬ GENERATINGCFM THEN
  670.         ; parameters: 
  671.         ;     scsiAddress       => D0
  672.         Macro
  673.         _SetSCSIDiskModeAddress
  674.             dc.w     $4840
  675.             move.w    #$0015,d0
  676.             dc.w     $A09E
  677.         EndM
  678.     ELSE
  679.         IMPORT_CFM_FUNCTION    SetSCSIDiskModeAddress
  680.     ENDIF
  681.  
  682. ;
  683. ; pascal void GetWakeupTimer(WakeupTime *theTime)
  684. ;
  685.     IF ¬ GENERATINGCFM THEN
  686.         ; parameters: 
  687.         ;     theTime           => A0
  688.         Macro
  689.         _GetWakeupTimer
  690.             moveq    #22,d0
  691.             dc.w     $A09E
  692.         EndM
  693.     ELSE
  694.         IMPORT_CFM_FUNCTION    GetWakeupTimer
  695.     ENDIF
  696.  
  697. ;
  698. ; pascal void SetWakeupTimer(WakeupTime *theTime)
  699. ;
  700.     IF ¬ GENERATINGCFM THEN
  701.         ; parameters: 
  702.         ;     theTime           => A0
  703.         Macro
  704.         _SetWakeupTimer
  705.             moveq    #23,d0
  706.             dc.w     $A09E
  707.         EndM
  708.     ELSE
  709.         IMPORT_CFM_FUNCTION    SetWakeupTimer
  710.     ENDIF
  711.  
  712. ;
  713. ; pascal Boolean IsProcessorCyclingEnabled(void)
  714. ;
  715.     IF ¬ GENERATINGCFM THEN
  716.         ; returns: 
  717.         ;     Boolean           <= D0
  718.         Macro
  719.         _IsProcessorCyclingEnabled
  720.             moveq    #24,d0
  721.             dc.w     $A09E
  722.         EndM
  723.     ELSE
  724.         IMPORT_CFM_FUNCTION    IsProcessorCyclingEnabled
  725.     ENDIF
  726.  
  727. ;
  728. ; pascal void EnableProcessorCycling(Boolean enable)
  729. ;
  730.     IF ¬ GENERATINGCFM THEN
  731.         ; parameters: 
  732.         ;     enable            => D0
  733.         Macro
  734.         _EnableProcessorCycling
  735.             dc.w     $4840
  736.             move.w    #$0019,d0
  737.             dc.w     $A09E
  738.         EndM
  739.     ELSE
  740.         IMPORT_CFM_FUNCTION    EnableProcessorCycling
  741.     ENDIF
  742.  
  743. ;
  744. ; pascal short BatteryCount(void)
  745. ;
  746.     IF ¬ GENERATINGCFM THEN
  747.         ; returns: 
  748.         ;     short             <= D0
  749.         Macro
  750.         _BatteryCount
  751.             moveq    #26,d0
  752.             dc.w     $A09E
  753.         EndM
  754.     ELSE
  755.         IMPORT_CFM_FUNCTION    BatteryCount
  756.     ENDIF
  757.  
  758. ;
  759. ; pascal Fixed GetBatteryVoltage(short whichBattery)
  760. ;
  761.     IF ¬ GENERATINGCFM THEN
  762.         ; parameters: 
  763.         ;     whichBattery      => D0
  764.         ; returns: 
  765.         ;     Fixed             <= D0
  766.         Macro
  767.         _GetBatteryVoltage
  768.             dc.w     $4840
  769.             move.w    #$001B,d0
  770.             dc.w     $A09E
  771.         EndM
  772.     ELSE
  773.         IMPORT_CFM_FUNCTION    GetBatteryVoltage
  774.     ENDIF
  775.  
  776. ;
  777. ; pascal void GetBatteryTimes(short whichBattery, BatteryTimeRec *theTimes)
  778. ;
  779.     IF ¬ GENERATINGCFM THEN
  780.         ; parameters: 
  781.         ;     whichBattery      => D0
  782.         ;     theTimes          => A0
  783.         Macro
  784.         _GetBatteryTimes
  785.             dc.w     $4840
  786.             move.w    #$001C,d0
  787.             dc.w     $A09E
  788.         EndM
  789.     ELSE
  790.         IMPORT_CFM_FUNCTION    GetBatteryTimes
  791.     ENDIF
  792.  
  793. ;
  794. ; pascal UInt8 GetDimmingTimeout(void)
  795. ;
  796.     IF ¬ GENERATINGCFM THEN
  797.         ; returns: 
  798.         ;     UInt8             <= D0
  799.         Macro
  800.         _GetDimmingTimeout
  801.             moveq    #29,d0
  802.             dc.w     $A09E
  803.         EndM
  804.     ELSE
  805.         IMPORT_CFM_FUNCTION    GetDimmingTimeout
  806.     ENDIF
  807.  
  808. ;
  809. ; pascal void SetDimmingTimeout(UInt8 timeout)
  810. ;
  811.     IF ¬ GENERATINGCFM THEN
  812.         ; parameters: 
  813.         ;     timeout           => D0
  814.         Macro
  815.         _SetDimmingTimeout
  816.             dc.w     $4840
  817.             move.w    #$001E,d0
  818.             dc.w     $A09E
  819.         EndM
  820.     ELSE
  821.         IMPORT_CFM_FUNCTION    SetDimmingTimeout
  822.     ENDIF
  823.  
  824. ;
  825. ; pascal void DimmingControl(Boolean enableSleep)
  826. ;
  827.     IF ¬ GENERATINGCFM THEN
  828.         ; parameters: 
  829.         ;     enableSleep       => D0
  830.         Macro
  831.         _DimmingControl
  832.             dc.w     $4840
  833.             move.w    #$001F,d0
  834.             dc.w     $A09E
  835.         EndM
  836.     ELSE
  837.         IMPORT_CFM_FUNCTION    DimmingControl
  838.     ENDIF
  839.  
  840. ;
  841. ; pascal Boolean IsDimmingControlDisabled(void)
  842. ;
  843.     IF ¬ GENERATINGCFM THEN
  844.         ; returns: 
  845.         ;     Boolean           <= D0
  846.         Macro
  847.         _IsDimmingControlDisabled
  848.             moveq    #32,d0
  849.             dc.w     $A09E
  850.         EndM
  851.     ELSE
  852.         IMPORT_CFM_FUNCTION    IsDimmingControlDisabled
  853.     ENDIF
  854.  
  855. ;
  856. ; pascal Boolean IsAutoSlpControlDisabled(void)
  857. ;
  858.     IF ¬ GENERATINGCFM THEN
  859.         ; returns: 
  860.         ;     Boolean           <= D0
  861.         Macro
  862.         _IsAutoSlpControlDisabled
  863.             moveq    #33,d0
  864.             dc.w     $A09E
  865.         EndM
  866.     ELSE
  867.         IMPORT_CFM_FUNCTION    IsAutoSlpControlDisabled
  868.     ENDIF
  869.  
  870.     ENDIF ; __POWER__
  871.